<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>复杂组件</title>
</head>
<body>
    <div id="app">

    </div>
    <div id="app1">

    </div>
    <script src="./lib/react.development.js"></script>
    <script src="./lib/react-dom.development.js"></script>
    <script src="./lib/babel.min.js"></script>
    <script type="text/babel">
        function Simple() {
            return (
                <h2>我是复杂的组件</h2>
            )
        }
        ReactDOM.render(<Simple />,document.getElementById('app'))

        class Complex extends React.Component{
            constructor() {
                super()
            }
            render() {
                return (
                    <h1>我是复杂组件</h1>
                )
            }
        }
        ReactDOM.render(<Complex />,document.getElementById('app1'))
    </script>
</body>
</html>